<template>
  <div class="invitecontent">
    <div class="Commonread">
      <div class="bannerread">
        <div class="actionrules" style="display: none;">
          <div class="ruleicon"><span class="iconfont">&#xe66d;</span></div>
          <a class="ruletext" :href="qr_code">活动规则</a>
        </div>
        <Banner :ImgObj="adver_info" :iscomread="iscom"></Banner>
      </div>
      <div class="invite">
        <div class="invitleft">共有<span>{{activenum}}</span>个邀请码</div>
        <div class="invitright" @click="getActiveCode">获取邀请码<span class="iconfont">&#xe685;</span></div>
      </div>
    </div>
    <ul class="invitelist">
      <li v-for="item in items" :key="item.user_activity_id" class="inviteparentli">
        <div class="invitetitle">{{item.vip_activity_name}}</div>
        <ul class="listli">
          <li v-for="child in item.childrenl" :key="child.invite_code_id">
            <div class="invitepartnername">{{child.activation_code}}</div>
            <div @click="invate(child)" class="invitebtn">立即邀请</div>
          </li>
        </ul>
      </li>
    </ul>
    <!--<div class="noaction">-->
      <!--<div class="noactionicon"><span class="iconfont">&#xe667;</span></div>-->
      <!--<div class="noactiontext">你还没有参加共读活动</div>-->
    <!--</div>-->
  </div>
</template>

<script>

  export default {
    name: 'index',
    data: function () {
      return {
        iscom:true
      }
    },
    props:['items','activenum','adver_info','qr_code'],
    mounted: function () {
    },
    methods: {
      getActiveCode(){
        this.$router.push({ name: 'ComreadInvitecodeBuy'})
      },
      invate:function(child){
        this.$emit('shareshow',child)
      }
    },
    components: {
      Banner:()=>import('../../components/Banner/index'),
    }
  }
</script>

<style scoped>
  @import "../../assets/css/views/ComreadInvitecode/index.css";

</style>
